﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CustomerOrderingSystem
{
    public partial class Login : Form
    {
        public static Main mainForm;
        public Login()
        {
            InitializeComponent();
            mainForm = new Main();

        }

        private void butLogin_Click(object sender, EventArgs e)
        {
            if (tbxUsr.Text == string.Empty || tbxPwd.Text == string.Empty)
            {
                MessageBox.Show("信息不完整！", "提示");
                return;
            }
            if (!tbxUsr.Text.Equals("admin") || !tbxPwd.Text.Equals("123456"))
            {
                MessageBox.Show("用户名或密码不正确！", "提示");
            }
            else
            {
                Login.mainForm.Show();
            }
        }

        private void butRegister_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
